package cn.iocoder.yudao.module.erp.controller.admin.stock.goods.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.erp.controller.admin.stock.goodswarehouselink.vo.GoodsWarehouseLinkRespVO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 物品 Response VO")
@Data
@ExcelIgnoreUnannotated
public class GoodsRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29312")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty("名字")
    private String name;

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("编号")
    private String code;

    @Schema(description = "物品描述", example = "你猜")
    @ExcelProperty("物品描述")
    private String description;

    @Schema(description = "规格型号")
    @ExcelProperty("规格型号")
    private String models;

    @Schema(description = "品牌")
    @ExcelProperty("品牌")
    private String brand;

    @Schema(description = "类目名称", example = "王五")
    @ExcelProperty("类目名称")
    private String categoryName;

    @Schema(description = "类目编号")
    @ExcelProperty("类目编号")
    private String categoryCode;

    @Schema(description = "类目id")
    @ExcelProperty("类目id")
    private Long categoryId;

    @Schema(description = "保质期开关", example = "0")
    @ExcelProperty(value = "保质期开关", converter = DictConvert.class)
    @DictFormat("infra_config_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Boolean expirationFlag;

    @Schema(description = "保质期")
    @ExcelProperty("保质期")
    private Integer expirationDay;

    @Schema(description = "提前报警天数")
    @ExcelProperty("提前报警天数")
    private Integer alarmDay;

    @Schema(description = "采购价格", example = "25231")
    @ExcelProperty("采购价格")
    private BigDecimal orderPrice;

    @Schema(description = "销售价格", example = "8376")
    @ExcelProperty("销售价格")
    private BigDecimal salePrice;

    @Schema(description = "条形码")
    @ExcelProperty("条形码")
    private String proBarCode;

    @Schema(description = "图片")
    @ExcelProperty("图片")
    private String image;

    @Schema(description = "库存上限")
    @ExcelProperty("库存上限")
    private BigDecimal maxQuantity;

    @Schema(description = "库存下限")
    @ExcelProperty("库存下限")
    private BigDecimal minQuantity;

    @Schema(description = "制造商型号")
    @ExcelProperty("制造商型号")
    private String produceModel;

    @Schema(description = "采购提前期")
    @ExcelProperty("采购提前期")
    private String purchaseLead;

    @Schema(description = "备注")
    @ExcelProperty("备注")
    private String remarks;

    @Schema(description = "附件")
    @ExcelProperty("附件")
    private String source;

    @Schema(description = "单位")
    @ExcelProperty("单位")
    private String unit;

    @Schema(description = "多单位开关", example = "1")
    @ExcelProperty(value = "多单位开关", converter = DictConvert.class)
    @DictFormat("infra_config_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer unitFlag;

    @Schema(description = "英文名")
    @ExcelProperty("英文名")
    private String nameEn;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("状态")
    private Integer status;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description ="库存数据")
    @ExcelProperty("库存")
    private List<GoodsWarehouseLinkRespVO> warehouseList;

    @Schema(description ="总库存")
    @ExcelProperty("总库存")
    private BigDecimal inventory;

}